package com.jxtc.enterprise.merchant.dto;

import com.jxtc.enterprise.admin.dto.FoodSpecificationDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

@Schema(description = "Admin 端新增菜品所需要传递的信息")
@Getter
@Setter
@ToString
public class FoodCreateDTO {

    @Schema(description = "菜品名称", example = "菜品测试")
    @NotBlank(message = "菜品名称不能为空")
    private String foodName;

    @Schema(description = "菜品图片 URL", example = "https://yong-shan-tuan.oss-cn-hangzhou.aliyuncs.com/60459f52-8db3-41b0-8a40-2f96cf7cf375.jpg")
    private String foodImage;

    @Schema(description = "店铺名称")
    private String storeName;

    @Schema(description = "店铺 ID", example = "1740657178653171713")
    // @NotBlank(message = "店铺 ID 不能为空")
    private String storeId;

    /**
     * 不一定是手机号，可能是其他账号
     */
    @NotBlank(message = "店铺 ID 不能为空")
    private String phone;

    @Schema(description = "菜品类型名称", example = "单独小炒")
    @NotBlank(message = "菜品类型名称不能为空")
    private String foodTypeName;

    @Schema(description = "店铺合作价格", example = "15")
    @NotBlank(message = "餐品价格不能为空")
    private String storePrice;

    @Schema(description = "排序", defaultValue = "1")
    @NotNull(message = "排序不能为空")
    @Min(value = 1, message = "排序至少为1")
    private Integer sortFlag;

    @Schema(description = "菜品描述", example = "这是一个测试")
    private String description;

    @Schema(description = "菜品是否上架，1 为上架状态（默认为 1），2 为下架状态 ", defaultValue = "1")
    private Integer status;

    @Schema(description = "是否必选", defaultValue = "false")
    private Boolean required;

    @Schema(description = "菜品规格")
    private List<FoodSpecificationDTO> specification;
}
